1. Field of the Invention
The present invention relates to a method, system, and an article of manufacture for preventing data loss.
2. Description of the Related Art
A storage subsystem, such as the International Business Machines (“IBM”) Enterprise Storage Server (“ESS”)**, receives Input/Output (I/O) requests directed toward an attached storage system. The attached storage system may comprise an enclosure including numerous interconnected disk drives, such as a Direct Access Storage Device (DASD), Redundant Array of Independent Disks (RAID Array), Just a Bunch of Disks (JBOD), etc.
I/O requests received by the storage subsystem include read requests to read data from a track and write requests to modify a track by writing data to the track. When the storage subsystem receives a write request, the storage subsystem stores the modified track in a cache, which may comprise one or more gigabytes of volatile storage, e.g., Random Access Memory (RAM), Dynamic Random Access Memory (DRAM), etc. Data stored in the cache may be lost under various situations, such as in the event of a loss of power supply to the volatile storage comprising the cache.
The cache can satisfy requests faster than the attached storage system. Hence, I/O requests can be satisfied faster if frequently accessed tracks are kept in the cache. In response to a read request, if a track is absent in the cache, the storage subsystem stages the track from the attached storage to the cache and satisfies the read request from the cache. However, since the capacity of the cache is relatively small when compared to the capacity of the attached storage system, the storage subsystem also discards tracks from the cache after first destaging the tracks that are modified. For example, when a cache is full discarding may be necessary before writing a new track to the cache or staging a track to the cache. The storage subsystem may discard tracks in a variety of ways, such as by discarding least recently used tracks or by discarding tracks by scanning the cache at periodic intervals.
While satisfying write requests, in addition to storing the modified tracks in the cache, the storage subsystem may also store a copy of the modified tracks in a nonvolatile storage unit (NVS), such as a battery backed-up volatile memory, to provide additional protection to the modified tracks in the event of a failure at the storage subsystem. Such failures may include a loss of power, resulting in a loss of the modified tracks from the volatile storage comprising the cache.
The storage subsystem stores the copy of the modified track in the NVS after the modified track has been stored in the cache, i.e., after committing the write request the second copy of the track is stored in the NVS. Hence, the NVS holds a second copy of the modified data after committing the write, but before destaging the data from the cache to the attached storage system. If the modified data were to be lost or corrupted in the cache before being destaged then the modified data could still be recovered from the NVS. The recovered data could then be destaged to the attached storage, thereby recovering from data loss or data corruption.
Notwithstanding the use of the NVS to reduce data errors in storage subsystems, there is a need in the art for improved techniques for still further reductions of data errors in storage subsystems.